package com.acme.bankapp.domain.bank;

public enum Gender {
	MALE("Mr."), FEMALE("Ms.");
	
	private String salutation;
	Gender(String salutation) {
		this.salutation = salutation;
	}
	public String getSalutation() {
		return salutation;
	}
	
	public static Gender getGender(String strRepr) {
		switch (strRepr.toLowerCase()) {
		case "f": return FEMALE;
		case "m": return MALE;
		default: throw new IllegalArgumentException("Unkown gender: " + strRepr);
		}
	}
}
